// components/headline-video/headline-video.js
Component({
  properties: {
    data: {
      type: Object,
      value: {},
      observer (newVal, oldVal) {
        let data = newVal
        data.video_duration = (newVal.video_duration / 60).toFixed(2).replace('.', ':')
        this.setData({
          datas: data
        })
      }
    }
  },

  methods: {
    toNewPage (event) {
      let path = event.currentTarget.dataset.path
      wx.navigateTo({
        url: `/pages/${path}/${path}`
      })
    }
  }
})
